<template>
	<view class="content">
		<map style="width: 100%; height: 1000px;" :latitude="mylatitude" :longitude="mylongitude" :markers="covers"></map>
	</view>
</template>

<script>
	export default{
		data() {
			return {
				latitude:0,
				longitude:0,
				mylatitude:30.526230995480322,
				mylongitude:114.35812750362396,
				covers: [
					{
					latitude: 30.526230995480322,
					longitude: 114.35812750362396,
					iconPath:"../static/icons/mylocation.png",
					}
				]
			}
		},
		created() {
			var that =this;
			uni.getStorageSync({
				key:"latitude",
				success:(res)=>{
					that.latitude=res.data
					
				}
			})
			uni.getStorageSync({
				key:"longitude",
				success:(res)=> {
					that.longitude=res.data
					
				}
			})
			console.log(that.latitude)
			console.log(that.longitude)
			that.covers.push({
				latitude:that.latitude,
				longitude:that.longitude,
				iconPath:"../static/icons/location.png"
			})
		}
	}
</script>

<style>
</style>
